package cn.cqone.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.UUID;

@Data
public class Order {
    //id
    private Long id;

    //定金单号,取6位数
    private String sn =  UUID.randomUUID().toString().substring(0,6).replaceAll("-","");

    //定金客户
    private String customer;

    //签订时间
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(
            pattern = "yyyy-MM-dd",
            timezone = "GMT+8"
    )
    private Date signTime = new Date();

    //营销人员 关联员工
    private String employee_id;

    //定金金额
    private BigDecimal sum;

    //摘要
    private String intro;

    //所属租户
    private String tenant_id;

    /*@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    public Date getSignTime() {
        return signTime;
    }
    public void setSignTime(Date signTime) {
        this.signTime = signTime;
    }*/
}
